package com.ybl.wallet.service.impl;

import com.ybl.wallet.entity.Transactions;
import com.ybl.wallet.mapper.TransactionsMapper;
import com.ybl.wallet.service.TransactionsService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class TransactionsServiceImpl implements TransactionsService {

    private TransactionsMapper transactionsMapper;

    @Override
    public List<Transactions> getTransactions(Long userId, Date startTime, Date endTime) {
        // 根据用户ID和时间范围查询钱包记录
        List<Transactions> records = transactionsMapper.selectTransactionsByUserIdAndTimeRange(userId, startTime, endTime);
        return records;
    }
}
